define([
	'backbone',
	'underscore',
	'ace/ace',
	'text!/templates/editor.html',
	'../models/editor'
],function(Backbone,_,ace,editorTemplate,EditorModel){
	var EditorView = Backbone.View.extend({
		el:$("#container"),
		render:function(){
			var compiledTemplate = _.template(editorTemplate);
			this.$el.html(compiledTemplate);
			var editor = ace.edit("editor");
			editor.setTheme("ace/theme/monokai");
			editor.getSession().setMode("ace/mode/javascript");
		}
	});
	return EditorView;
});